-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web/react compiler #1109
Web/react compiler #1109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 10 out of 10 changed files in this pull request and generated no suggestions.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1109 +/- ##
======================================
Coverage ? 3.80%
======================================
Files ? 45
Lines ? 2732
Branches ? 48
======================================
Hits ? 104
Misses ? 2628
Partials ? 0 ☔ View full report in Codecov by Sentry. |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Switch to using Babel for React compilation, removing @vitejs/plugin-react-swc in favor of @vitejs/plugin-react. This update includes setting up Babel plugins for React Compiler and integrating ESLint support. These changes improve compatibility and prepare for upcoming React features. Signed-off-by: suddenlyGiovanni <[email protected]>
Add ESLint configuration to the UI package, enabling linting support for React and TypeScript files. Installed new dependencies including ESLint, eslint-plugin-react, and typescript-eslint to provide extensive linting capabilities in the development environment. Removed inline eslint-disable comments from accordion stories to comply with the new linting rules. Signed-off-by: suddenlyGiovanni <[email protected]>
Disabled the `react/no-unescaped-entities` rule in the ESLint configuration for the UI package. Removed individual rule disablings from Storybook story files, maintaining consistency and reducing redundancy. This update streamlines ESLint configurations across similar components. Signed-off-by: suddenlyGiovanni <[email protected]>
Integrated `vite-plugin-babel` into the Vite config for enhanced Babel processing, including support for TypeScript and React compiler . Updated dependencies to incorporate Babel configurations and necessary plugins. Signed-off-by: suddenlyGiovanni <[email protected]>
351fe45
to
4b4845c
Compare
Integrated the `@storybook/addon-a11y` to enhance accessibility checks in the UI package. Additionally, enabled strict mode for the Storybook framework options to ensure stricter validation and development practices. Updated dependencies to support these additions.
Rearranged the `App` and `Layout` component definitions to improve code readability and maintain a logical structure. This change ensures consistent organization of components within the file.
Extend Babel's `include` paths to cover `src` directory and shared `ui` package. This ensures proper transpilation of files across the updated project structure.
Added ESLint-specific dependencies (@eslint/js, eslint, eslint-plugin-react, typescript-eslint, globals) to improve linting capabilities. Updated pnpm-lock.yaml to reflect these additions and bump dependency versions. Removed outdated and deprecated packages from the lockfile for cleanup.
Refactored ESLint configuration for improved readability and consistency by aligning indentation and formatting. Disabled specific React rules and adjusted type usage for better development flow. Removed outdated eslint-disable comments from env.server.ts and generate-djb2-hash.ts.
@@ -374,24 +439,38 @@ packages: | |||
resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} | |||
engines: {node: '>=6.9.0'} | |||
|
|||
'@babel/[email protected]': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
'@babel/core': 7.26.0 | ||
'@babel/helper-annotate-as-pure': 7.25.9 | ||
'@babel/helper-member-expression-to-functions': 7.25.9 | ||
'@babel/helper-optimise-call-expression': 7.25.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
@@ -5088,23 +5820,41 @@ | |||
dependencies: | |||
'@babel/types': 7.26.0 | |||
|
|||
'@babel/[email protected]': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
'@babel/[email protected]': {} | ||
|
||
'@babel/[email protected]': {} | ||
|
||
'@babel/[email protected](@babel/[email protected])': | ||
dependencies: | ||
'@babel/core': 7.26.0 | ||
'@babel/helper-environment-visitor': 7.22.20 | ||
'@babel/helper-member-expression-to-functions': 7.24.5 | ||
'@babel/helper-optimise-call-expression': 7.22.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
'@babel/types': 7.26.0 | ||
'@babel/core': 7.26.0 | ||
'@babel/helper-member-expression-to-functions': 7.25.9 | ||
'@babel/helper-optimise-call-expression': 7.25.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
suddenlygiovanni.dev/pnpm-lock.yaml
Line 438 in a9317c1
'@babel/[email protected]': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
suddenlygiovanni.dev/pnpm-lock.yaml
Line 5766 in a9317c1
'@babel/helper-optimise-call-expression': 7.22.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"
suddenlygiovanni.dev/pnpm-lock.yaml
Line 5819 in a9317c1
'@babel/[email protected]': |
Introduced support for Backbone and CircleCI icons in the resume dev-icons component. This enhances the icon library and improves the visual representation for these technologies.
Simplified components by removing unnecessary `memo` usage across multiple files. This reduces complexity and ensures components are easier to read and maintain without sacrificing performance in these contexts.
a9317c1
to
1ff67da
Compare
Simplify state initialization by removing redundant useMemo calls in `education.tsx` and `skills.tsx`. This improves readability and reduces overhead without changing functionality.
Replaced `useMemo` calls with direct array assignments to optimize code readability and performance. Introduced explicit type annotation for `toggleExperiences` to improve type safety.
Replaced unnecessary useMemo and useCallback with direct initialization and inline function definition. This improves code readability and reduces complexity in the skills accordion logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 20 changed files in this pull request and generated no comments.
Files not reviewed (13)
- apps/web/package.json: Language not supported
- packages/ui/package.json: Language not supported
- apps/web/eslint.config.js: Evaluated as low risk
- apps/web/src/root.tsx: Evaluated as low risk
- apps/web/src/routes/resume/education.tsx: Evaluated as low risk
- apps/web/src/routes/resume/experience.tsx: Evaluated as low risk
- apps/web/src/routes/resume/experiences.tsx: Evaluated as low risk
- apps/web/src/routes/resume/generate-djb2-hash.ts: Evaluated as low risk
- apps/web/src/routes/resume/skills.tsx: Evaluated as low risk
- apps/web/src/utils/env.server.ts: Evaluated as low risk
- apps/web/vite.config.ts: Evaluated as low risk
- packages/ui/.storybook/main.ts: Evaluated as low risk
- packages/ui/eslint.config.js: Evaluated as low risk
Introduction of
React Compiler
and fixes to how component are authored.This pull request includes several changes to the
apps/web
andpackages/ui
directories to enhance ESLint configurations, update dependencies, and refactor React components by removing unnecessary memoization and simplifying state management.ESLint Configuration and Dependency Updates:
apps/web/eslint.config.js
: Added ESLint configurations for React and TypeScript, including plugins and rules forreact-compiler
.apps/web/package.json
: Updated dependencies to includevite-plugin-babel
,@babel/preset-typescript
,eslint-plugin-react
, andeslint-plugin-react-compiler
. [1] [2]packages/ui/eslint.config.js
: Added ESLint configurations for React and TypeScript, similar toapps/web
.packages/ui/package.json
: Updated dependencies to align with the changes inapps/web
, includingeslint-plugin-react
,eslint-plugin-react-compiler
, andvite-plugin-babel
. [1] [2]React Component Refactoring:
apps/web/src/routes/resume/education.tsx
: Removedmemo
from theEducation
component and its subcomponents, and simplified state management by removinguseCallback
anduseMemo
. [1] [2] [3] [4] [5]apps/web/src/routes/resume/experience.tsx
: Similar refactoring aseducation.tsx
, removingmemo
and simplifying state management. [1] [2] [3] [4] [5]apps/web/src/routes/resume/skills.tsx
: RefactoredSkills
component by removingmemo
and simplifying state management. [1] [2] [3] [4] [5] [6]apps/web/src/routes/resume/experiences.tsx
: RefactoredExperiences
component similarly toSkills
andEducation
. [1] [2] [3]Miscellaneous Changes:
apps/web/src/root.tsx
: ReorderedApp
andLayout
components for better clarity and structure. [1] [2]apps/web/src/routes/resume/generate-djb2-hash.ts
: Removed an unnecessary ESLint directive.apps/web/src/utils/env.server.ts
: Removed an unnecessary ESLint directive.apps/web/vite.config.ts
: Addedvite-plugin-babel
configuration for better TypeScript support.packages/ui/.storybook/main.ts
: Added@storybook/addon-a11y
and enabledstrictMode
in Storybook configuration.packages/ui/src/components/accordion/accordion.stories.tsx
: Removed unnecessary ESLint disable comments.